package com.example.normal.entity;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.example.base.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.Date;

/**
 * 学生信息
 *
 * @author wahoyu
 * @date 2023-07-23
 */
@Data
@ExcelIgnoreUnannotated
public class Student extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    @ExcelProperty("学生编号")
    @ColumnWidth(20)
    private Long id;

    /**
     * 学生姓名
     */
    @ExcelProperty("学生姓名")
    @ColumnWidth(20)
    private String name;

    /**
     * 年龄
     */
    @ExcelProperty("年龄")
    @ColumnWidth(20)
    private Integer age;

    /**
     * 班级信息
     */
    @ExcelProperty("班级信息")
    @ColumnWidth(20)
    private String studentClass;

    /**
     * 手机号
     */
    @ExcelProperty("手机号")
    @ColumnWidth(20)
    private String phone;


    /**
     * 删除时间
     */
    @JsonFormat(
            pattern = "yyyy-MM-dd HH:mm:ss",
            timezone = "GMT+8"
    )
    private Date deleteTime;

    /**
     * 删除人
     */
    private String deleteBy;

    /**
     * 删除标识
     */
    @TableLogic
    private String deleteFlag;


}
